from pydantic import BaseModel

class ChatTTSRequest(BaseModel):
    text: str
    voice: str = "auto"
    speed: int = 150
    volume: float = 0.9

class ChatTTSResponse(BaseModel):
    status: str
    filename: str
    url: str
    text: str
    length: int

class BaseResponse(BaseModel):
    code: int
    msg: str
    data: ChatTTSResponse | None = None

# 新增异常响应模型
class ErrorResponse(BaseModel):
    code: int
    msg: str